@extends('layouts.result')

@section('content')
<!-- 1.0 -->
<table class="table table-striped table-hover">
<thead>
	<tr>
		<th class="col-lg-1">#</th>
		<th>Item Name</th>
		<th class="col-lg-2">Price</th>
		<th class="col-lg-1">Merchant</th>		
		<th class="col-lg-1">Vend Location</th>
	</tr>
</thead>

<tbody>
	
	@foreach ($items as $key => $item)
		<tr id="item-{{ $key+1 }}">
			<td>{{ $key+1 }}</td>
			<td>{{ $item->item }}</td>
			<td>@if ($item->price == "nego")
				Negotiable
			@else
				{{ $item->price }}
			@endif</td>
			<td><button type="button" onClick="parent.location='http://adf.ly/7104086/merchantslist.cu.cc/details/{{$item->id}}/merch'" class="btn btn-primary"><span class="glyphicon glyphicon-hand-down"></span></button></td>
			<td><button type="button" onClick="parent.location='http://adf.ly/7104086/merchantslist.cu.cc/details/{{$item->id}}/loc'" class="btn btn-primary"><span class="glyphicon glyphicon-hand-down"></span></button></td>
		</tr><!-- {{ $key }} -->
	@endforeach
	
</tbody>
</table>

<ul class="pagination">
  {{ $items->links() }}
</ul>
@stop